<?php

/**
 * Main application launcher with manual requiring of all models and controllers
 * @package Nina
 * @author John Main <john@thedaddy.org>
 */
class Nina_Launcher_Manual extends Nina_Launcher
{	
	/**
	 * Registers all required libraries with the autoloader
	 */
	protected function loadLibraries() {
		require_once NINA_ROOT.DIRECTORY_SEPARATOR.'Nina'.DIRECTORY_SEPARATOR.'Autoloader.php';
		require_once NINA_ROOT.DIRECTORY_SEPARATOR.'Nina'.DIRECTORY_SEPARATOR.'Autoloader'.DIRECTORY_SEPARATOR.'Nina.php';
		$nina_autoloader = new Nina_Autoloader_Nina(NINA_ROOT);
		$nina_autoloader->register();

		if(defined('COMMONS')) {
			$nina_autoloader = new Nina_Autoloader_Nina(COMMONS);
			$nina_autoloader->register();
		}
		
		$model_root = (defined('MODEL_ROOT')) ? MODEL_ROOT : APP_ROOT . DIRECTORY_SEPARATOR . 'models';

 		Nina_Utils::requireAll($model_root);
 		Nina_Utils::requireAll(APP_ROOT . DIRECTORY_SEPARATOR . 'controllers');
	}
}
